<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>个人中心</title>
    <link rel="stylesheet" href="css/recognize.css">
    <link rel="stylesheet" href="css/style.css">
    <link rel="stylesheet" href="css/board.css">
    <script src="https://cdn.tailwindcss.com"></script>
    <link rel="stylesheet" href="https://rsms.me/inter/inter.css"/>
    <!-- 引入 ECharts -->
    <script src="https://cdn.jsdelivr.net/npm/echarts/dist/echarts.min.js"></script>
    <!-- 设置网页图标 -->
    <link rel="icon" href="images/favicon.gif">
    <link rel="shortcut icon" href="images/favicon.gif">
    <style>
        .my-container {
            margin-top: 150px;
            margin-left: 150px;
        }
        .conta {
            font-size: 80px;
            font-family: Microsoft YaHei, sans-serif;
            font-weight: 600;
        }
        .username {
            font-family: Microsoft YaHei, sans-serif;
            font-weight: 600;
        }
        .my-container button {
            font-size: 20px;
            font-weight: 600;
            padding: 10px;
            margin-right: 20px;
            border-radius: 50px;
            border:white 2px solid;
        }
    </style>
</head>
<body>
<div class="violet-glow"></div>
<header class="blurry-navbar">
    <div class="navbar-content">
        <h1 class="text-animation text-3xl font-bold">藏药植物药知识平台</h1>
        <nav>
            <ul>
                <li><a href="recognize.html">图片识别</a></li>
                <li><a href="graph.html">知识图谱</a></li>
                <li><a href="database.html">数据库</a></li>
                <li><a href="board.html">数据显示</a></li>
                <li><a href="me.html">个人中心</a></li>
            </ul>
        </nav>
    </div>
</header>

<div>
    <div class="my-container">
        <div class="username">用户名: </div>
        <br>
        <div class="conta">屁都没有</div>
        <br>
        <br>
        <br>
        <br>
        <br>
        <br>
        <br>
        <br>
        <br>
        <br>
        <br>
        <button onclick="back()">返回首页</button>
        <button onclick="quit()">退出登录</button>
    </div>

</div>

<script>
    $.ajax({
        type: "post",
        url: "http://localhost:8084/me",
        success: function (username) {
            // 获取h1标签并修改其内容
            const headerElement = $(".username");
            headerElement.textContent = '用户名:' + username;
        }
    })
    function back() {
        location.href = "recognize.html";
    }
    function quit() {
        location.href = "login.html";
    }
</script>

</body>
</html>